<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:output method="html"/>
	<xsl:template match="/">
<style type="text/css" media="screen">
body
{
    margin: 0 0 0 0;
    font-family: arial;
    font-size: 8px;
}
#cajaMateria{
	width:190px;
}
#boxNotaContenedora{
text-align:center;
}
#boxnota
{
    border: solid 1px #000;
    text-align: center;
    width: 40px;
    font-weight: bold;
	
	
}

.TDTrimestre table tr td#boxNotaContenedora div#boxnota
{
    border: none;
    width: 160px;
}
.tbAlumno
{
    border-collapse: collapse;
    background-color: #732808;
    width: 100%;
    height: 50px;
    border: solid 5px #732808;
}
.TDTitle
{
    /*BORDER-RIGHT: #c7c8ca 2px solid;  	BORDER-TOP: #c7c8ca 2px solid; BORDER-LEFT: #c7c8ca 2px solid; COLOR: #ffffff; BORDER-BOTTOM: #c7c8ca 2px solid; BACKGROUND-COLOR: #732808;  	*/
    text-align: left;
}
.TDNombre
{
    font-weight: bold;
    color: #ffffff;
    background-color: #c6c6c6;
    width: 160px;
    text-align: center;
}
.TDAlumno
{
    font-weight: bold;
    font-size: 28px;
    color: white;
    text-align: center;
}
.TDNombreMateria
{
    border: solid 1px #c3c3c3;
    font-weight: bold;
    background-color: #e0e2e1;
    text-align: center;
    width: 200px;
}
.TDNotas
{
    border: #732808 2px solid;
    background-color: #e0e1e3 text-align:center;
    
}
.TDNotasSPACE
{
    border: #732808 2px solid;
    font-size: 10px;
    height: 40px;
    background-color: #732808;
}
.TDQuincena
{
    font-weight: bold;
    color: white;
    background-color: #732808;
    text-align: center;
    border: #732808 2px solid;
    font-size: 10px;
}

.TDTrimestre, .TDResumen
{
    text-align: center;
    font-weight: bold;
    height: 40px;
    background-color: #f0e1e3;
    border: solid 2px #732808;
    border-bottom: solid 9px #732808;
    border-top: solid 9px #732808;
    nowrap: nowrap;
}
.TDResumen
{
    height: 40px;
    background-color: #E0C2C7;
    border: #732808 2px solid;
   /* width: 200px;*/    nowrap: nowrap;
}
.Bt
{
    border-right: 0px;
    border-top: 0px;
    border-left: 0px;
    cursor: hand;
    border-bottom: 0px;
}
.n1, .n2, .n3, .n4, .n5, .n6, .n7, .n8, .n9, .n10
{
    text-align: center;
}
.n1, .n2, .n3, .n31, .n41
{
    color: red;
}
.n4, .n5, .n61
{
    color: green;
}
.n6, .n7, .n8, .n9, .n10
{
    color: blue;
}

</style>

<style type="text/css" media="print">
body
{
    margin: 0 0 0 0;
    zoom: .7;
}
table
{
    table-layout: auto;
    border-collapse: collapse;
}
.noprint
{
    display: none;
}
#boxNotaContenedora{
text-align:center;
nowrap:nowrap;
}
#boxnota{
border:solid 1px #000;
text-align:center;
font-size:50px;
width:150px;
FONT-WEIGHT: bold; 
nowrap:nowrap;

}

.TDTrimestre table tr td#boxNotaContenedora div#boxnota
{
border:none;
width:160px;
font-size:50px;
}
.tbAlumno
{
    border-collapse: collapse;
 background-color: #732808; 
 width:100%;
 height:50px;
 border:solid 5px #732808;
}

.TDTitle img{
zoom:3;
}

.TDNombre {
	FONT-WEIGHT: bold; 
	FONT-SIZE: 30px; 
	COLOR: #ffffff; 
	BACKGROUND-COLOR: #c6c6c6;
    width: 160px;
	text-align:center;
}
.TDAlumno{
	FONT-WEIGHT: bold; 
	FONT-SIZE: 50px; 
	COLOR: white; 
	TEXT-ALIGN: center
}
.TDNombreMateria {
	font-size:40px;
	FONT-WEIGHT: bold; 
	BACKGROUND-COLOR: #e0e2e1; 
	TEXT-ALIGN: center;
	width:200px;
	border:solid 1px #c3c3c3;

}
.TDNotas {
	BORDER: #732808 2px solid; 
	FONT-SIZE: 12px;  
	BACKGROUND-COLOR: #e0e1e3
	text-align:center;

}
.TDNotasSPACE {
	BORDER: #732808 2px solid; 
	FONT-SIZE: 10px; 
	HEIGHT: 40px; BACKGROUND-COLOR: #732808
}
.TDQuincena {
	FONT-WEIGHT: bold; 
	COLOR: white; 
	BACKGROUND-COLOR: #732808; TEXT-ALIGN: center;
	BORDER: #732808 2px solid; 
	height:80px;
	font-size:40px;
}

.TDTrimestre,.TDResumen  {
	text-align:center;
	FONT-WEIGHT: bold; 
	BACKGROUND-COLOR: #f0e1e3;
	BORDER: solid 2px #732808 ;
	border-bottom:solid 9px #732808 ; 
	border-top:solid 9px #732808 ; 
	nowrap:nowrap;
	height:100px;
	font-size:40px;
}
.TDResumen {
	BACKGROUND-COLOR:#E0C2C7;
	BORDER: #732808 2px solid; 
	width:200px;
	nowrap:nowrap;
	font-size:40px;
	
}
.Bt {
	BORDER-RIGHT: 0px; BORDER-TOP: 0px; BORDER-LEFT: 0px; CURSOR: hand; BORDER-BOTTOM: 0px
}
.n1,.n2,.n3,.n4,.n5,.n6,.n7,.n8,.n9,.n10{		text-align:center;}
.n1,.n2,.n3{	color:red;	}
.n4,.n5{	color:green;}
.n6,.n7,.n8,.n9,.n10{	color:blue;	}
</style>
<style type="text/css" media="screen">		
DIV#tbl-container {
	OVERFLOW: auto; WIDTH: 980px; HEIGHT: 500px
}
TABLE {
	TABLE-LAYOUT: auto; BORDER-COLLAPSE: collapse
}

THEAD TH {
	BORDER-RIGHT: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; 
	POSITION: relative; TEXT-ALIGN: center
}
THEAD TH.locked {
	BORDER-RIGHT: silver 1px solid; FONT-WEIGHT: bold; FONT-SIZE: 10px; 
	 POSITION: relative; TEXT-ALIGN: center
}
THEAD TH {
	Z-INDEX: 20; 
	TOP: expression(document.getElementById("tbl-container").scrollTop-2)
}
THEAD TH.locked {
	Z-INDEX: 30; 
}
TD.locked {
	Z-INDEX: 10;
	LEFT: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft); 
	POSITION: relative
}
TH.locked {
	Z-INDEX: 10; 
	LEFT: expression(parentNode.parentNode.parentNode.parentNode.scrollLeft); 
	POSITION: relative
}


</style>
		<table>
			<tbody>
				<tr>
					<td class="TDTitle">
						<img src="../images/iis-banner.jpg"/>
					</td>
				</tr>
				<tr>
					<td>
						<xsl:apply-templates select="alumno"/>
					</td>
				</tr>
				<tr>
					<td>
						<div id="tbl-container">
							<xsl:call-template name="planilla"/>
						</div>
					</td>
				</tr>
			</tbody>
			<tfoot>
			</tfoot>
		</table>
	</xsl:template>


	<!--- HEAD ALUMNO -->
	<xsl:template match="alumno">
		<table class="tbAlumno">
			<tbody>
				<tr>
					<td class="TDNombre">Nombre Alumno</td>
					<td class="TDAlumno">
						<xsl:value-of select="@nombre"/>
					</td>
					<td class="TDNombre" style="width: 37px">Año</td>
					<td class="TDAlumno">
						<xsl:value-of select="@Anio"/>
					</td>
					<td class="TDNombre" style="width: 37px">División</td>
					<td class="TDAlumno">
						<xsl:value-of select="@Curso"/>
					</td>
				</tr>
			</tbody>
		</table>
	</xsl:template>
	<!--- HEAD ALUMNO -->


	<!--notas-->
	<xsl:template name="planilla">
		<table id="tbl">
			<thead>
				<th class="locked TDNombreMateria">
					<div>&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;&#xA0;</div>
				</th>
				<xsl:apply-templates select="alumno/Materias/Materia[@Tipo=1]"/>
				<th class="TDNotasSPACE">&#xA0;</th>
				<xsl:apply-templates select="alumno/Materias/Materia[@Tipo=2]"/>
			</thead>
			<tbody>

				<xsl:apply-templates select="alumno/Periodos/Periodo"/>
				<xsl:apply-templates select="alumno/Periodos/Resumen"/>
			</tbody>
		</table>
	</xsl:template>

	<!--materias-->
	<xsl:template match="Materia">
		<th class="TDNombreMateria">
			<div id="cajaMateria">
				<xsl:value-of select="@Nombre"/>
			</div>
		</th>
	</xsl:template>

	<!--Periodos-->
	<xsl:template match="Periodo">
		<xsl:variable name="idper">
			<xsl:value-of select="@IdPeriodo"/>
		</xsl:variable>
		<xsl:variable name="idEstilo">
			<xsl:value-of select="@Estilo"/>
		</xsl:variable>
		<tr>
			<td>
				<xsl:attribute name="class">locked <xsl:value-of select="@Estilo"/></xsl:attribute>
				<xsl:choose>
					<xsl:when test="@FechaHasta=''">
						<xsl:value-of select="@FechaDesde"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="@Particion"/>
						<br/>
						<xsl:value-of select="@FechaDesde"/>al <xsl:value-of select="@FechaHasta"/></xsl:otherwise>
				</xsl:choose>
			</td>
			<xsl:call-template name="GrupoNotas">
				<xsl:with-param name="idEstilo">
					<xsl:value-of select="$idEstilo"/>
				</xsl:with-param>
				<xsl:with-param name="idPer">
					<xsl:value-of select="$idper"/>
				</xsl:with-param>
				<xsl:with-param name="tipo">1</xsl:with-param>
			</xsl:call-template>
			<td class="TDNotasSPACE">
			</td>
			<xsl:call-template name="GrupoNotas">
				<xsl:with-param name="idEstilo">
					<xsl:value-of select="$idEstilo"/>
				</xsl:with-param>
				<xsl:with-param name="idPer">
					<xsl:value-of select="$idper"/>
				</xsl:with-param>
				<xsl:with-param name="tipo">2</xsl:with-param>
			</xsl:call-template>
		</tr>
		<tr>
		</tr>
	</xsl:template>

	<xsl:template match="Resumen">
		<tr>
			<td class="locked TDResumen">
				<xsl:value-of select="@Nombre"/>
			</td>
			<xsl:for-each select="materia[@tipomateria=1]">
				<td class="TDResumen">&#xA0;</td>
			</xsl:for-each>
			<td class="TDNotasSPace">&#xA0;</td>
			<xsl:for-each select="materia[@tipomateria=2]">
				<td class="TDResumen">&#xA0;</td>
			</xsl:for-each>
		</tr>
	</xsl:template>


	<xsl:template name="GrupoNotas">
		<xsl:param name="idPer"/>
		<xsl:param name="idEstilo"/>
		<xsl:param name="tipo"/>
		<xsl:for-each select="/alumno/Materias/Materia[@Tipo=$tipo]">
			<td class="TDNotas" style="text-align:center;">
				<xsl:if test="$idEstilo='TDTrimestre'">
					<xsl:attribute name="class">
						<xsl:value-of select="$idEstilo"/>
					</xsl:attribute>
				</xsl:if>
				<xsl:variable name="idmate">
					<xsl:value-of select="@IdMateria"/>
				</xsl:variable>
				<!--tengo las notas-->
				<table width="100%" >
					<xsl:for-each select="/alumno/Periodos/Periodo[@IdPeriodo=$idPer and @Estilo=$idEstilo]/materia[@IdMateria=$idmate]/nota">
						<tr>
							<xsl:apply-templates select="modalidad">
								<xsl:with-param name="idEstilo">
									<xsl:value-of select="$idEstilo"/>
								</xsl:with-param>
							</xsl:apply-templates>
						</tr>
					</xsl:for-each>
				</table>
			</td>
		</xsl:for-each>
	</xsl:template>

	<xsl:template match="modalidad">
		<xsl:param name="idEstilo"/>
		<td id="boxNotaContenedora" >
		<!--erificar los colores segun la nota-->
			<div id="boxnota">
			<xsl:attribute name="class">n<xsl:value-of select="round(@nota)"/><xsl:if test="@nota=3.50 or @nota=5.50">1</xsl:if></xsl:attribute>

			<xsl:attribute name="title">
				<xsl:value-of select="../@Modalidad"/>/<xsl:value-of select="@observacion"/></xsl:attribute>
			<xsl:if test="@nota=0">
			 	<xsl:if test="$idEstilo='TDTrimestre'">&#xA0;</xsl:if>
			  <xsl:if test="not($idEstilo='TDTrimestre')">A</xsl:if>
		    </xsl:if>
			<xsl:if test="../@Modalidad=Promedio"></xsl:if>
			<xsl:if test="not(@nota=0)">
				<xsl:value-of select="@Letra"/>
			</xsl:if>
			</div>
		</td>
	</xsl:template>
	<!--notas-->
	<xsl:template match="nota">
		<td>
			<xsl:value-of select="@nota"/>
		</td>
	</xsl:template>

	<xsl:template name="zoomprint">
		<input type="text" name="zoom" id="zoom" value="80"></input>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario1" userelativepaths="yes" externalpreview="no" url="..\..\..\..\Temp\midata.xml" htmlbaseurl="" outputurl="" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag>
</metaInformation>
-->